import axios from '@/utils/request.js'

function filter(data) {
    return axios({
        url: '/api/forum/admin/filter',
        method: 'POST',
        data
    })
}


function forumReq() {
    return axios({
        url: '/api/forum/admin/all',
        method: 'POST'
    })
}

function delForumReq(data) {
    return axios({
        url: '/api/forum/admin/delete/'+data,
        method: 'POST',
    })
}
function detail(data){
    return axios({
        url: '/api/forum/detail',
        method: 'POST',
        data:data
    })
}
function saveOrUpdate(data){
   return  axios({
        url: '/api/forum/admin/saveOrUpdate',
        method: 'POST',
        data:data
    })
}

export {forumReq, delForumReq,detail,saveOrUpdate,filter}